package com.gxa.finance.controller;

import com.gxa.common.commons.R;
import com.gxa.common.pojo.ServiceTag;
import com.gxa.finance.service.ServiceTagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@Component
@RestController
@RequestMapping("/finance/ServiceTag")
public class ServiceTagController {

    @Autowired
    private ServiceTagService ServiceTagService;

    //1、查询接口
    @GetMapping("/findServiceTagList")
    public R findServiceTagList (String serve,Integer price){

        return ServiceTagService.findServiceTagList(serve,price);
    }

    //2、添加
    @PostMapping("/addServiceTag")
    public R addServiceTag (@RequestBody ServiceTag ServiceTag){

        return ServiceTagService.addServiceTag(ServiceTag);
    }

    //3、删除
    @PostMapping("/delServiceTag")
    public R delServiceTag ( ServiceTag ServiceTag){

        return ServiceTagService.delServiceTag(ServiceTag);
    }

    //修改
    @PostMapping("/updateServiceTag")
    public R updateServiceTag (@RequestBody ServiceTag ServiceTag){

        return ServiceTagService.updateServiceTag(ServiceTag);
    }

}
